﻿using System;

namespace Ganss.Excel.Tests.Data
{
    class OfferDetails
    {
        [Column("Offer")]
        public bool IsOffer { get; set; }
        [Column("OfferEnd")]
        public DateTime End { get; set; }

        public override bool Equals(object obj)
        {
            if (obj is not OfferDetails o) return false;
            return o.IsOffer == IsOffer && o.End == End;
        }

        public override int GetHashCode()
        {
            return HashCode.Combine(IsOffer, End);
        }

        public OfferDetails(bool isOffer, DateTime end)
        {
            IsOffer = isOffer;
            End = end;
        }

        public OfferDetails() { }
    }
}